package LS;

import java.sql.Timestamp;
import java.util.*;
import org.apache.ibatis.session.SqlSession;
import util.MyBatisUtil;

public class UsersHome {

	public static Users selectById(String id) {
		SqlSession session = MyBatisUtil.getSession();
		try {
			UsersMapper mapper = session.getMapper(UsersMapper.class);
			return mapper.selectById(id);
		} finally {
			session.close();
		}
	}

	public static List<Users> selectAll() {
		SqlSession session = MyBatisUtil.getSession();
		try {
			UsersMapper mapper = session.getMapper(UsersMapper.class);
			return mapper.selectAll();
		} finally {
			session.close();
		}
	}
}
